package com.zzs.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 响应码
 * @author zzs
 * @date 2025/03/17
 */
@AllArgsConstructor
@Getter
public enum ResponseCode {
    SUCCESS(2000, "操作成功"),

    BAD_REQUEST(4000, "请求参数错误"),
    UNAUTHORIZED(4001, "登录过期或未登录"),
    FORBIDDEN(4002, "权限不足"),
    ACCESS_DENIED(4003, "访问被禁止"),
    NOT_FOUND(4004, "资源不存在"),
    METHOD_NOT_ALLOWED(4005, "请求方式错误"),
    INVALID_CREDENTIALS(4006, "用户名或密码错误"),
    INVALID_VERIFICATION_CODE(4007, "验证码错误"),
    USER_ALREADY_EXISTS(4008, "用户已存在"),
    RESOURCE_CONFLICT(4009, "资源已存在"),
    FILE_TOO_LARGE(4010, "用户上传文件太大"),
    FILE_NO_MATCH(4011, "用户上传文件类型不匹配"),
    FILE_UPLOAD_ERROR(4012, "文件上传失败"),
    USER_NO_EXISTS(4013, "用户不存在"),
    PHONE_ERROR(4014, "手机号格式错误"),
    FAIL(4015, "操作失败"),
    JUDGING(4016, "正在判题中"),


    INTERNAL_SERVER_ERROR(5000, "服务器内部错误"),
    SERVICE_UNAVAILABLE(5001, "服务不可用"),
    DATABASE_ERROR(5002, "数据库异常"),
    NETWORK_TIMEOUT(5003, "网络超时");

    private final int code;
    private final String message;
}
